$(function() {
	var counter = 1;
	// 每页展示6个
//	var num = 6;
//	var pageStart = 0,
//		pageEnd = 0;
var links = document.getElementById("links").innerHTML;

	if(getCookie('pulling')=='stops'){
		delCookie('pulling');
	}


	$('.project-list').dropload({
		scrollArea: window,
		loadDownFn: function(me) {

		if(getCookie('pulling')=='stops'){
			me.noData();
			me.resetload();
			setTimeout('document.getElementById("stops").innerHTML=""',1500);
			return false;
		}

			var html = "";
			$.ajax({
				type: 'GET',
				url: links,
				data: {
					p: counter
				},
				dataType: 'json',
				success: function(data) {
					if(data==undefined || data==''){ return false; }
					data=JSON.parse(data);
					if(data.error==100){
						setCookie('pulling','stops');
						me.noData();
						me.resetload();
					}else if(data.error==150){
						setCookie('pulling','stops');
						me.noData();
						me.resetload();
						setTimeout('document.getElementById("stops").innerHTML=""',1500);
					}else{
						counter++;
						bing(data);
						
						me.resetload();
					}
					
				},
				error: function(xhr, type) {
					
				}
			});

			
			
		}
	});
});